package edu.avans.hartigehap.domain.decorator;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "MENUITEMS")
@DiscriminatorColumn(name = "DTYPE")
@Inheritance
public abstract class AbstractMenuItem implements Serializable {

//	protected Long id;
	protected String name;
	//protected int price;
	
//	@Id
//	@GeneratedValue(strategy = GenerationType.AUTO)
//	@Column(name = "TESTMENUITEM_ID")
//	public Long getId() {
//		return id;
//	}
//
//	public void setId(Long id) {
//		this.id = id;
//	}
	
	@Id
	@Column(name = "MENUITEM_ID")
	// optional
	public String getId() {
		return name;
	}

	public void setId(String name) {
		this.name = name;
	}

	@Transient
	public abstract int getPrice();
	
	public abstract void setPrice(int price);
}
